
package cs.ohms.subsystem.validation.annotation;

import cs.ohms.subsystem.validation.NSEmailValidation;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE, ElementType.TYPE_USE })
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = NSEmailValidation.class)
@Documented
public @interface NSEmail {
    String message() default "Email address format error";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
